package com.nice.nice201110.utils;

import com.nice.nice201110.entity.TUser;
import com.nice.nice201110.mapper.TUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.util.DigestUtils;

import java.util.Date;

public class SpringContextUtil {
    /**
     * 上下文获取工具类
     * @author nice
     *
     */


    private static ApplicationContext applicationContext;


    public static void setApplicationContext(ApplicationContext context) {
        applicationContext = context;
    }

    public static Object getBean(String beanId) {
        return applicationContext.getBean(beanId);
    }
}
